package com.db.stockexchange.common.messages.server;

import com.db.stockexchange.common.OrderSide;
import com.db.stockexchange.common.OrderStatus;

public class FilledMessage extends OkReportMessage {
	private float lastPrice;
	private int lastQuantity;
	private String partyId;
	
	public FilledMessage(String senderCompID, int orderID,
			String symbol, OrderSide side, OrderStatus orderStatus,
			int orderQuantity, int cumQuantity, int leavesQuantity, float price,
			float lastPrice, int lastQuantity, String partyId) {
		super(senderCompID, orderID, symbol, side, orderStatus,
				orderQuantity, cumQuantity, leavesQuantity, price);
		this.lastPrice = lastPrice;
		this.lastQuantity = lastQuantity;
		this.partyId = partyId;
	}

	public float getLastPrice() {
		return lastPrice;
	}

	public int getLastQuantity() {
		return lastQuantity;
	}
	
	public String getPartyId() {
		return partyId;
	}
	
	@Override
	public String toString() {
		return new StringBuilder().append(super.toString()).append(", ")
				.append("lastPx=").append(lastPrice).append(", ")
				.append("lastQty=").append(lastQuantity).append(", ")
				.append("partyID=").append(partyId).toString();
	}
}
